Favorite Websites
Here are my top 20 most bookmarked—and likely most visited—sites:
Top 20 most bookmarked domains:
- www.youtube.com (11586 bookmarks)
- www.twitch.tv (535 bookmarks)
- www.google.com (428 bookmarks)
- www.reddit.com (355 bookmarks)
- kick.com (264 bookmarks)
- github.com (206 bookmarks)
- xxxxxxxxxxxx (159 bookmarks)
- www.linkedin.com (152 bookmarks)
- xxxxxxxxxxx (114 bookmarks)
- www.tiktok.com (101 bookmarks)
- stackoverflow.com (87 bookmarks)
- www.instagram.com (82 bookmarks)
- live.nicovideo.jp (64 bookmarks)
- medium.com (62 bookmarks)
- x.com (58 bookmarks)
- huggingface.co (51 bookmarks)
- twitcasting.tv (42 bookmarks)
- xxxxxxxxxxxx (40 bookmarks)
- www.nicovideo.jp (39 bookmarks)
- theflixertv.to (38 bookmarks)
If you want to know your top 20 most bookmarked sites, export your bookmarks as JSON and run the code below.
bash
go run main.go <json-file>code:
golang
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/url"
"os"
"sort"
)
// Bookmark represents the basic structure we care about in the JSON
type Bookmark struct {
URI string `json:"uri,omitempty"`
Children []Bookmark `json:"children,omitempty"`
}
func main() {
if len(os.Args) < 2 {
fmt.Println("Usage: go run main.go bookmarks.json")
return
}
filePath := os.Args[1]
// read the exported JSON
data, err := ioutil.ReadFile(filePath)
if err != nil {
panic(err)
}
var root Bookmark
err = json.Unmarshal(data, &root)
if err != nil {
panic(err)
}
domainCount := make(map[string]int)
collectDomains(&root, domainCount)
// convert map to slice for sorting
type kv struct {
Key string
Value int
}
var sorted []kv
for k, v := range domainCount {
sorted = append(sorted, kv{k, v})
}
sort.Slice(sorted, func(i, j int) bool {
return sorted[i].Value > sorted[j].Value
})
fmt.Println("Top 20 most bookmarked domains:")
for i, kv := range sorted {
if i >= 20 {
break
}
fmt.Printf("%d. %s (%d bookmarks)\n", i+1, kv.Key, kv.Value)
}
}
// recursive function to traverse bookmarks tree
func collectDomains(b *Bookmark, domainCount map[string]int) {
if b.URI != "" {
u, err := url.Parse(b.URI)
if err == nil && u.Host != "" {
domainCount[u.Host]++
}
}
for _, child := range b.Children {
collectDomains(&child, domainCount)
}
}